{% set pypi_name = 'cursive' %}
{% set upstream_version = upstream_version('0.2.2') %}
{% set rpm_release = '1' %}
{% set source = url_pypi() %}
Name:           {{ py2name() }}
Version:        {{ py2rpmversion() }}
Release:        {{ py2rpmrelease() }}
Summary:        Cursive implements OpenStack-specific validation of digital signatures
License:        {{ license('Apache-2.0') }}
Group:          Development/Languages/Python
URL:            https://opendev.org/x/{{ pypi_name }}
Source0:        {{ source }}
BuildRequires:  openstack-macros
BuildRequires:  {{ py3('Sphinx') }}
BuildRequires:  {{ py3('castellan') }}
BuildRequires:  {{ py3('cryptography') }}
BuildRequires:  {{ py3('openstackdocstheme') }}
BuildRequires:  {{ py3('oslo.i18n') }}
BuildRequires:  {{ py3('oslo.serialization') }}
BuildRequires:  {{ py3('oslo.utils') }}
BuildRequires:  {{ py3('oslotest') }}
BuildRequires:  {{ py3('pbr') }}
BuildRequires:  {{ py3('python-subunit') }}
BuildRequires:  {{ py3('reno') }}
BuildRequires:  {{ py3('testrepository') }}
BuildRequires:  {{ py3('testscenarios') }}
BuildRequires:  {{ py3('testtools') }}
BuildArch:      noarch

%description
Cursive implements OpenStack-specific validation of digital signatures.
As OpenStack continues to mature, robust security controls become increasingly
critical. The cursive project contains code extracted from various OpenStack
projects for verifying digital signatures. Additional capabilities will be
added to this project in support of various security features.

%package -n {{ py2name(py_versions='py3') }}
Summary:        Cursive implements OpenStack-specific validation of digital signatures
Requires:       {{ py3('castellan') }}
Requires:       {{ py3('cryptography') }}
Requires:       {{ py3('oslo.i18n') }}
Requires:       {{ py3('oslo.log') }}
Requires:       {{ py3('oslo.serialization') }}
Requires:       {{ py3('oslo.utils') }}
Requires:       {{ py3('pbr') }}

%description -n {{ py2name(py_versions='py3') }}
Cursive implements OpenStack-specific validation of digital signatures.
As OpenStack continues to mature, robust security controls become increasingly
critical. The cursive project contains code extracted from various OpenStack
projects for verifying digital signatures. Additional capabilities will be
added to this project in support of various security features.

%prep
%autosetup -n {{ pypi_name }}-{{ upstream_version }}
%py_req_cleanup

%build
%py3_build

%install
%py3_install

%check
PYTHON=python3 python3 setup.py testr

%files -n {{ py2name(py_versions='py3') }}
%license LICENSE
%doc ChangeLog README.rst
%{python3_sitelib}/*

%changelog
